test-prune: Read to the end of cut(1) output
authorSimon McVittie <smcv@debian.org>
Mon, 7 Mar 2022 19:52:25 +0000 (19:52 +0000)
committerSimon McVittie <smcv@debian.org>
Mon, 7 Mar 2022 21:12:45 +0000 (21:12 +0000)
commit96fe94e7cd5927414fed1be846ee881dde8a969d
tree25cdb1840d5e6c4d6eafc0289057fbc4e8aec2e1
parent5089d9e0be04c459fe1451a6580bc900f022e00a
test-prune: Read to the end of cut(1) output

If we use head(1) to take only the first two lines, then cut(1) and
earlier pipeline entries are killed by SIGPIPE (if they have not already
terminated), and that's flagged as an error under `set -o pipefail`.
Use an equivalent sed command to take exactly the second line, but
without SIGPIPE.

Signed-off-by: Simon McVittie <smcv@debian.org>
Gbp-Pq: Name test-prune-Read-to-the-end-of-cut-1-output.patch
tests/test-prune.sh